﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebShopDAL;

namespace TestDB
{
    class Program
    {
        static void Main(string[] args)
        {
            var article = ArticleDB.GetArticleByArticleID(1);
            Console.WriteLine(article.ToString());
            //User jesper = new User("Jesper", "123", "Jesper", "Dahlberg", "870227", "Liljeborgsgatan 22A", "23152", "Trelleborg", "aa@aa.com", "0708-959896", 1);
            //var newUser = UserDB.InsertNewUser(new User("Jesper", "123", "Jesper", "Dahlberg", "870227", "Liljeborgsgatan 22A", "23152", "Trelleborg", "aa@aa.com", "123456"));
            //var Jesper = UserDB.GetUser(1);
            //Console.WriteLine(Jesper.Username);

            //UserDB.UpdateUser(jesper);

            //UserDB.DeleteUser(1);

            //bool userFound = UserDB.IsLoggedIn("Jesper", "123");
            //Console.WriteLine(userFound);

            //Category category = new Category("Apples");
            //CategoryDB.InsertNewCategory(category);

            //Console.WriteLine(CategoryDB.GetCategory(1));

            //Category category = new Category("Pears", 1);
            //CategoryDB.UpdateCategory(category);
            //Console.WriteLine(CategoryDB.GetCategory(1));

            //CategoryDB.DeleteCategory(1);

            //OrderRowDB.InsertNewOrderRow(new OrderRow(1, 3, 10, 2));
            //Console.WriteLine(OrderRowDB.GetOrderRow(4));
            //OrderRowDB.UpdateOrderRow(new OrderRow(4, 3, 20, 2));

            //OrderRowDB.DeleteOrderRow(4);
            //var  list = CategoryDB.GetAllCategories();
            //foreach(var cat in list)
            //{
            //    Console.WriteLine(cat);
            //}

            //var list = OrderRowDB.GetAllOrderRowsOnOrderId(3);
            //if (list != null)
            //    foreach (var item in list)
            //    {
            //        Console.WriteLine(item);
            //    }


            Console.ReadKey();

        }
    }
}
